/**
 * @FileName Client.java
 * @Package com.designMode.state
 * -------------------------------------
 * @function Please write description of function
 * @Date 2016-1-19 下午2:29:05
 * -------------------------------------
 * Copyright (c) 2016,顾博君 All Rights Reserved.
 */
package com.designMode.state;

/**
 * @author 顾博君
 * @ClassName Client
 * @Date 2016-1-19 下午2:29:05
 * @Function 场景类
 */
public class Client {
    public static void main(String[] args) {
        //定义环境角色
        Context context = new Context();
        //初始化状态
        context.setCurrentState(new ConcreteState1());
        System.out.println("当前状态："+context.getCurrentState());
        //行为委托
        context.handle1();
        System.out.println("当前状态："+context.getCurrentState());
        context.handle2();
        System.out.println("当前状态："+context.getCurrentState());
    }
}
